Multi processor computer systems have become commonplace in the last few years. In these systems, a process is separated into component instruction sequences, referred to as threads that are processed concurrently by the multiple processors. In some computer systems such as the BluGene computer system developed by the International Business Machines Corporation (IBM), there may be many thousands of threads executing at the same time. Even in the more traditional computer systems such as the eServer iSeries developed by IBM, some Websphere applications may have many hundreds of threads.
In a multithreaded environment any thread can operate on a file/socket descriptor (referred to herein as “thread entities”) opened by a parent thread. There are scenarios where a file or a socket opened by one thread is inadvertently closed or its contents corrupted by some other thread. There are no known solutions for this issue as all the threads in a process share the same thread entities, which are global. It would be beneficial in some embodiments to provide a mechanism to ameliorate the above mentioned scenarios by specifying protection levels on thread entities created by parent threads.